//
//  PokemonInfoPanel.swift
//  ToDo
//
//  Created by yanhangpu on 2021/7/23.
//

import SwiftUI

struct PokemonInfoPanel: View {

    var item: PokeMasterItem

    var topIndicator: some View {
        RoundedRectangle(cornerRadius: 3)
            .frame(width: 40, height: 6, alignment: .center)
            .opacity(0.2)
    }
    
    var indicator: some View {
        RoundedRectangle(cornerRadius: 3)
            .frame(width: 40, height: 6, alignment: .center)
            .opacity(0.2)
    }
    
    var body: some View {
        VStack {
            topIndicator
        }
    }
}

extension PokemonInfoPanel {
    struct Header: View {
        let item: PokeMasterItem
        var body: some View {
            VStack {
                HStack {
                    Image(item.roleInfo.imageName)
                    VStack {
                        Text(item.roleInfo.nickName)
                        Text(item.roleInfo.englishName)
                        Text("种子宝可梦")
                    }
                    
                    
                }
                HStack {
                    
                }
            }
        }
        
    }
}

struct PokemonInfoPanel_Previews: PreviewProvider {
    static var previews: some View {
        let pokeMasterData: [PokeMasterItem] = PokeMasterModel.loadPokeMasterData()
        PokemonInfoPanel(item: pokeMasterData[0])
    }
}
